package com.zx.model.log;

import java.util.Date;

/**
 * @Project: 20180730_ngnix_analyze
 * @Title: LogMode	日志模型
 * @author: xue.zhang	
 * @date: 2018年7月31日下午5:19:37
 * @company: alibaba
 * @Copyright: Copyright (c) 2017
 * @version v1.0
 */
public class LogMode {
	/**
	 * 日志的组，log_format  main  。。。。。
	 */
	private String logFormatName;
	/**
	 * 日志的名字,access_log  logs/access.log  main;
	 */
	private String logName;
	
	private String remoteAddr; //与$http_x_forwarded_for 用以记录客户端的ip地址；
	
	private String remoteUser;//用来记录客户端用户名称；
	
	private String timeLocal;// 用来记录访问时间与时区；
	
	private Date timeLocalDate;// 由timeLocal字符串解析过来的时间
	
	private String request; //用来记录请求的url与http协议；
	
	private String status; //用来记录请求状态；成功是200，
	
	private String bodyBytesSent;//记录发送给客户端文件主体内容大小；
	
	private String httpReferer;//用来记录从那个页面链接访问过来的；
	
	private String httpUserAgent;//记录客户端浏览器的相关信息；
	
	private String httpXForwardedFor;//这个有时候是空的，必须放在最后，或者不放
	
	private String httpHost;//请求地址，即浏览器中你输入的地址（IP或域名）
	
	private String upstreamStatus;//upstream状态
	
	private String sslProtocol;//SSL协议版本
	
	private String sslCipher;//交换数据中的算法
	
	private String upstreamAddr;//后台upstream的地址，即真正提供服务的主机地址
	
	private String requestTime;//整个请求的总时间
	
	private String upstreamResponseTime;//请求过程中，upstream响应时间
	
	
	public String getLogFormatName() {
		return logFormatName;
	}

	public void setLogFormatName(String logFormatName) {
		this.logFormatName = logFormatName;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public String getRemoteAddr() {
		return remoteAddr;
	}

	public void setRemoteAddr(String remoteAddr) {
		this.remoteAddr = remoteAddr;
	}

	public String getRemoteUser() {
		return remoteUser;
	}

	public void setRemoteUser(String remoteUser) {
		this.remoteUser = remoteUser;
	}

	public String getTimeLocal() {
		return timeLocal;
	}

	public void setTimeLocal(String timeLocal) {
		this.timeLocal = timeLocal;
	}

	public String getRequest() {
		return request;
	}

	public void setRequest(String request) {
		this.request = request;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getBodyBytesSent() {
		return bodyBytesSent;
	}

	public void setBodyBytesSent(String bodyBytesSent) {
		this.bodyBytesSent = bodyBytesSent;
	}

	public String getHttpReferer() {
		return httpReferer;
	}

	public void setHttpReferer(String httpReferer) {
		this.httpReferer = httpReferer;
	}

	public String getHttpUserAgent() {
		return httpUserAgent;
	}

	public void setHttpUserAgent(String httpUserAgent) {
		this.httpUserAgent = httpUserAgent;
	}

	public String getHttpXForwardedFor() {
		return httpXForwardedFor;
	}

	public void setHttpXForwardedFor(String httpXForwardedFor) {
		this.httpXForwardedFor = httpXForwardedFor;
	}

	public Date getTimeLocalDate() {
		return timeLocalDate;
	}

	public void setTimeLocalDate(Date timeLocalDate) {
		this.timeLocalDate = timeLocalDate;
	}

	public String getHttpHost() {
		return httpHost;
	}

	public void setHttpHost(String httpHost) {
		this.httpHost = httpHost;
	}

	public String getUpstreamStatus() {
		return upstreamStatus;
	}

	public void setUpstreamStatus(String upstreamStatus) {
		this.upstreamStatus = upstreamStatus;
	}

	public String getSslProtocol() {
		return sslProtocol;
	}

	public void setSslProtocol(String sslProtocol) {
		this.sslProtocol = sslProtocol;
	}

	public String getSslCipher() {
		return sslCipher;
	}

	public void setSslCipher(String sslCipher) {
		this.sslCipher = sslCipher;
	}

	public String getUpstreamAddr() {
		return upstreamAddr;
	}

	public void setUpstreamAddr(String upstreamAddr) {
		this.upstreamAddr = upstreamAddr;
	}

	public String getRequestTime() {
		return requestTime;
	}

	public void setRequestTime(String requestTime) {
		this.requestTime = requestTime;
	}

	public String getUpstreamResponseTime() {
		return upstreamResponseTime;
	}

	public void setUpstreamResponseTime(String upstreamResponseTime) {
		this.upstreamResponseTime = upstreamResponseTime;
	}

	@Override
	public String toString() {
		return "LogMode [logFormatName=" + logFormatName + ", logName=" + logName + ", remoteAddr=" + remoteAddr
				+ ", remoteUser=" + remoteUser + ", timeLocal=" + timeLocal + ", timeLocalDate=" + timeLocalDate
				+ ", request=" + request + ", status=" + status + ", bodyBytesSent=" + bodyBytesSent + ", httpReferer="
				+ httpReferer + ", httpUserAgent=" + httpUserAgent + ", httpXForwardedFor=" + httpXForwardedFor
				+ ", httpHost=" + httpHost + ", upstreamStatus=" + upstreamStatus + ", sslProtocol=" + sslProtocol
				+ ", sslCipher=" + sslCipher + ", upstreamAddr=" + upstreamAddr + ", requestTime=" + requestTime
				+ ", upstreamResponseTime=" + upstreamResponseTime + "]";
	}
}

